package com.galaxis.wms.query

import com.galaxis.wms.entity.BasItem
import com.querydsl.core.types.Path
import com.querydsl.core.types.PathMetadata
import com.querydsl.core.types.dsl.DateTimePath
import com.querydsl.core.types.dsl.NumberPath
import com.querydsl.core.types.dsl.StringPath
import com.querydsl.sql.ColumnMetadata
import com.querydsl.sql.RelationalPathBase

import java.sql.Timestamp
import java.sql.Types

import static com.querydsl.core.types.PathMetadataFactory.forVariable

/**
 * 产品资料基础属性(bas_item)
 */
@SuppressWarnings("ALL")
class QBasItem extends RelationalPathBase<BasItem> {
    /** bas_item表 */
    public static final QBasItem basItem = new QBasItem("bas_item")

    /** 产品ID */
    public final NumberPath<Long> itemId = createNumber("itemId", Long.class)
    /** 产品编号 */
    public final StringPath itemCode = createString("itemCode")
    /** 产品名称 */
    public final StringPath itemName = createString("itemName")
    /** 产品描述 */
    public final StringPath itemDesc = createString("itemDesc")
    /** 产品规格 */
    public final StringPath itemSpecification = createString("itemSpecification")
    /** 产品分类 */
    public final StringPath itemClassify = createString("itemClassify")
    /** 产品类别 */
    public final StringPath itemCategory = createString("itemCategory")
    /** 产品ABC */
    public final StringPath itemAbc = createString("itemAbc")
    /** 助记码 */
    public final StringPath logogram = createString("logogram")
    /** 厂家 */
    public final StringPath manufacturer = createString("manufacturer")
    /** 产地 */
    public final StringPath origin = createString("origin")
    /** 批准文号 */
    public final StringPath approvalNo = createString("approvalNo")
    /** 库存环境 */
    public final StringPath stockEnv = createString("stockEnv")
    /** 是否短流程 */
    public final StringPath isShortProcess = createString("isShortProcess")
    /** 是否启用 */
    public final StringPath isEnable = createString("isEnable")
    /** 创建者 */
    public final StringPath createBy = createString("createBy")
    /** 建立时间 */
    public final DateTimePath<Timestamp> createAt = createDateTime("createAt", Timestamp.class)
    /** 修改者 */
    public final StringPath updateBy = createString("updateBy")
    /** 更新时间 */
    public final DateTimePath<Timestamp> updateAt = createDateTime("updateAt", Timestamp.class)
    /** 物流类型 */
    public final StringPath logisType = createString("logisType")
    /** 是否串码 */
    public final StringPath isUpnManagment = createString("isUpnManagment")
    /** 串码个数 */
    public final NumberPath<Integer> strCodeNum = createNumber("strCodeNum", Integer.class)

    QBasItem(String variable) {
        super(BasItem.class, forVariable(variable), "public", "bas_item")
        addMetadata()
    }

    QBasItem(String variable, String schema, String table) {
        super(BasItem.class, forVariable(variable), schema, table)
        addMetadata()
    }

    QBasItem(String variable, String schema) {
        super(BasItem.class, forVariable(variable), schema, "bas_item")
        addMetadata()
    }

    QBasItem(Path<? extends BasItem> path) {
        super(path.getType(), path.getMetadata(), "public", "bas_item")
        addMetadata()
    }

    QBasItem(PathMetadata metadata) {
        super(BasItem.class, metadata, "public", "bas_item")
        addMetadata()
    }

    void addMetadata() {
        addMetadata(itemId, ColumnMetadata.named("item_id").withIndex(1).ofType(Types.BIGINT).withSize(64))
        addMetadata(itemCode, ColumnMetadata.named("item_code").withIndex(2).ofType(Types.VARCHAR).withSize(128))
        addMetadata(itemName, ColumnMetadata.named("item_name").withIndex(3).ofType(Types.VARCHAR).withSize(255))
        addMetadata(itemDesc, ColumnMetadata.named("item_desc").withIndex(4).ofType(Types.VARCHAR).withSize(255))
        addMetadata(itemSpecification, ColumnMetadata.named("item_specification").withIndex(5).ofType(Types.VARCHAR).withSize(128))
        addMetadata(itemClassify, ColumnMetadata.named("item_classify").withIndex(6).ofType(Types.VARCHAR).withSize(50))
        addMetadata(itemCategory, ColumnMetadata.named("item_category").withIndex(7).ofType(Types.VARCHAR).withSize(50))
        addMetadata(itemAbc, ColumnMetadata.named("item_abc").withIndex(8).ofType(Types.VARCHAR).withSize(50))
        addMetadata(logogram, ColumnMetadata.named("logogram").withIndex(9).ofType(Types.VARCHAR).withSize(255))
        addMetadata(manufacturer, ColumnMetadata.named("manufacturer").withIndex(10).ofType(Types.VARCHAR).withSize(128))
        addMetadata(origin, ColumnMetadata.named("origin").withIndex(11).ofType(Types.VARCHAR).withSize(128))
        addMetadata(approvalNo, ColumnMetadata.named("approval_no").withIndex(12).ofType(Types.VARCHAR).withSize(128))
        addMetadata(stockEnv, ColumnMetadata.named("stock_env").withIndex(13).ofType(Types.VARCHAR).withSize(50))
        addMetadata(isShortProcess, ColumnMetadata.named("is_short_process").withIndex(14).ofType(Types.VARCHAR).withSize(50))
        addMetadata(isEnable, ColumnMetadata.named("is_enable").withIndex(15).ofType(Types.VARCHAR).withSize(50))
        addMetadata(createBy, ColumnMetadata.named("create_by").withIndex(16).ofType(Types.VARCHAR).withSize(20))
        addMetadata(createAt, ColumnMetadata.named("create_at").withIndex(17).ofType(Types.TIMESTAMP).withSize(100))
        addMetadata(updateBy, ColumnMetadata.named("update_by").withIndex(18).ofType(Types.VARCHAR).withSize(20))
        addMetadata(updateAt, ColumnMetadata.named("update_at").withIndex(19).ofType(Types.TIMESTAMP).withSize(100))
        addMetadata(logisType, ColumnMetadata.named("logis_type").withIndex(20).ofType(Types.VARCHAR).withSize(255))
        addMetadata(isUpnManagment, ColumnMetadata.named("is_upn_managment").withIndex(21).ofType(Types.VARCHAR).withSize(50))
        addMetadata(strCodeNum, ColumnMetadata.named("str_code_num").withIndex(22).ofType(Types.INTEGER).withSize(32))
    }
}
